home *** CD-ROM | disk | FTP | other *** search
- Path: oden.abc.se!usenet
- From: m9944@abc.se (Peter T Karlsson)
- Newsgroups: comp.sys.cbm
- Subject: Re: anyone doing heavy math on a c64?
- Date: 23 Feb 1996 10:01:41 +0100
- Organization: ABC-Klubben
- Message-ID: <4gjvpl$l3d@tor.abc.se>
- References: <4e2l0q$n8f@turing.fwi.uva.nl> <4ej26o$qmr@news.acns.nwu.edu> <4f49t9$2q5@madeline.INS.CWRU.Edu> <4fchhs$2r1@tor.abc.se>
- <4ftcnm$bfs@news.acns.nwu.edu>
- Reply-To: dat95pkn@idt.mdh.se
- NNTP-Posting-Host: tor.abc.se
- Summary: INT(.1+.9) differs on C64 & C128
- X-Newsreader: wsOMR/SOUP v1.07b
-
- I artikel '<4ftcnm$bfs@news.acns.nwu.edu>' skrev judd@merle.acns.nwu.edu (Stephen Judd) detta:
-
- >>C=64+64*INT(.1+.9)
- >>will give C 64 for a C64 and 128 on a C128!
- > I find this very interesting. Does anyone have an explanation for
- > this?
-
- I don't know for certain, but I guess that it was a bug in the C64 floating
- point arithmetics that was changed in the C128. Does anyone know if this
- "bug" exists in all C64:s, and that it is gone in all C128:s? I use it in
- all my "dual-mode" programs to determine what machine is used. I find it
- easier to do than to PEEK around :-)
-
- > I started to investigate this further. On the 64 (at least, in 64
- > mode), INT(.1+.9) returns 0, but A=.1+.9:?INT(A) returns 1.
-
- Interesting... The storage of A=.1+.9 is probably rounded off somewhere, but
- is not when using INT(.1+.9).
-
- \\//
- Peter - dat95pkn@idt.mdh.se - http://www.mds.mdh.se/~dat95pkn
- ... ((wrong && wrong) != right)
-